package cn.jbit.houserent.action;

import java.util.List;
import java.util.Map;

import cn.jbit.houserent.bean.House;
import cn.jbit.houserent.bean.User;
import cn.jbit.houserent.biz.HouseBiz;
import cn.jbit.houserent.biz.impl.HouseBizImpl;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class Manage extends ActionSupport{

	private static final long serialVersionUID = 1L;
	private List<House> result;

	public List<House> getResult() {
		return result;
	}

	public void setResult(List<House> result) {
		this.result = result;
	}

	public String execute() throws Exception{
		ActionContext ac = ActionContext.getContext();
		User user =(User)ac.getSession().get("user");
		HouseBiz hb =new HouseBizImpl();
		 result = hb.getHouseByUser(user);	
		return SUCCESS;
	}
}
